Print error codes (printError)
| Code | Name | Meaning |
|---|---|---|
0 | OK | Success |
1 | AUTH_ERROR | Signature/auth error |
2 | INVALID_JSON | JSON/Base64 parse error |
3 | MISSING_PARAMS | Required fields missing |
4 | AMOUNT_MISMATCH | Amount mismatch |
5 | INTERNAL_ERROR | Internal/not implemented |
6 | SHIFT_NOT_OPEN | Shift is not open |
7 | PAYMENT_TYPE_NOT_SUPPORTED | Unsupported payment type |
8 | DOCUMENT_NOT_PAID | Document not fully paid |
9 | DOCUMENT_NOT_FOUND | Document not found |
10 | DOCUMENT_NOT_FISCALIZED | Document not fiscalized |
11 | CHANGE_ONLY_FOR_CASH | Change allowed only for cash |
12 | DOC_TIME_BEFORE_SHIFT | Document time before shift open |
13 | CREDIT_SINGLE_PAYMENT | Credit payment constraint violated |
14 | INVALID_DATE_FORMAT | Invalid date format |
15 | DOCUMENT_NOT_PRINTED | Document not printed |
23 | BANK_TERMINAL_NOT_CONNECTED | Bank terminal not connected |
44 | DOCUMENT_STILL_PROCESSING | Document processing in progress |
printError is a separate code space from code. It always accompanies a print-stage failure, but the accompanying code is not always
15:
/sale,/refund,/close_shift,/deposit,/withdraw— print failures usecode = 15(DOCUMENT_NOT_PRINTED)./x_report,/dates_report,/check_copy— print failures currently surface ascode = -1or nocode, not15(known inconsistency in the current server; the same underlying print-error condition, just not normalized toDOCUMENT_NOT_PRINTEDon these routes).
Because of this, check for a non-null printError regardless of what code is, rather than gating print-error handling on code = 15
alone.
printError | Meaning |
|---|---|
1 | Overheat |
2 | No paper |
3 | Overflow |
4 | Printer state error |
5 | Other printer error |
6 | Low battery |
7 | No connection |